#include <iostream>
#include "threadpool.hpp"

using namespace std;

int SquareAdd(int a, int b)
{
    std::this_thread::sleep_for(std::chrono::seconds(1));
    return a*a + b*b;
}

int main()
{
    threadpool thpool(3);
    for(int i = 0; i < 10; i++)
    {
        auto fu = thpool.push(SquareAdd, 10, i);
        cout << i << " -> " << fu.get() << endl;
    }
    
    return 0;
}
